import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;

class Student {

}
public class Test {


    public static void main(String[] args) {
        Set<String> set1 = new TreeSet<>();
        set1.add("hello");
        set1.add("abc");
        set1.add("the");
        System.out.println(set1);
    }
    public static void main2(String[] args) {
        Map<String,Integer> treeMap =new TreeMap<>();
        treeMap.put(new String(),1);
        treeMap.put(new String(),4);
    }
    public static void main1(String[] args) {
        Map<String,Integer> treeMap =new TreeMap<>();
        treeMap.put("abc",4);
        treeMap.put("hello",3);
        treeMap.put("the",8);
        System.out.println(treeMap);
        Integer val = treeMap.getOrDefault("hello2",100);
        System.out.println(val);
        Set<String> keySet = treeMap.keySet();
        System.out.println(keySet);
        System.out.println("==============");
        Set<Map.Entry<String,Integer>> set = treeMap.entrySet();
        for (Map.Entry<String,Integer> e:set){
            System.out.println("key:"+e.getKey()+" valeu:"+e.getValue());
        }
    }

}
